<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
	<head>
            <meta charset="utf-8">
            <title><?php echo ($seo_title); ?></title>
            <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
            <meta name="apple-mobile-web-app-capable" content="yes">
            <meta name="apple-mobile-web-app-status-bar-style" content="black">
            <meta name="format-detection" content="telephone=no" />
            <meta name="format-detection" content="email=no" />
            <meta name="keywords" content="<?php echo ($seo_keywords); ?>" />
            <meta name="description" content="<?php echo ($seo_description); ?>">
            <meta name="screen-orientation" content="portrait">
            <meta name="x5-orientation" content="portrait">
            <link rel="shortcut icon" href=" /favicon.ico" />
            <link rel="apple-touch-icon" href="/icon.png" />
            <link rel="apple-touch-start-image" href="/start.png" />

            <link rel="stylesheet" type="text/css" href="/Static/mobile/css/style.css">
            <link rel="stylesheet" type="text/css" href="/Static/mobile/css/SpsBtn.css">
            <script src="/Static/mobile/js/jquery.js"></script>
            <script src="/Static/mobile/js/layer.mobile-v1.6/layer.m.js"></script>
            <script src="/Static/mobile/js/common.js"></script>
            <script src="/Static/mobile/js/jquery.lazyload.min.js"></script>
            <link rel="stylesheet" type="text/css" href="/Static/mobile/iconfont/iconfont.css">
            <!-- 微信分享 -->
            <!-- 如果是微信客户端 -->
<input id="networkType" value="" type="hidden">
<?php if($is_wechat){ ?>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script type="text/javascript">
		wx.config({
		
		<?php if($hlopenid =="oaGjOtyJCTObWB2BZbkLfxyVHTMA"){?>
		 debug:true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，
		
		<?php } ?>
		
		  //若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
		  appId:'<?php echo ($jssign['appid']); ?>', // 必填，公众号的唯一标识
		  timestamp:'<?php echo ($jssign['timestamp']); ?>', // 必填，生成签名的时间戳
		  nonceStr:'<?php echo ($jssign['noncestr']); ?>', // 必填，生成签名的随机串
		  signature:'<?php echo ($jssign['signature']); ?>',// 必填，签名，见附录1
	      jsApiList: [
	                  'checkJsApi',
	                  'onMenuShareTimeline',
	                  'onMenuShareAppMessage',
	                  'onMenuShareQQ',
	                  'onMenuShareWeibo',
	                  'onMenuShareQZone',
	                  'hideMenuItems',
	                  'showMenuItems',
	                  'hideAllNonBaseMenuItem',
	                  'showAllNonBaseMenuItem',
	                  'translateVoice',
	                  'startRecord',
	                  'stopRecord',
	                  'onVoiceRecordEnd',
	                  'playVoice',
	                  'onVoicePlayEnd',
	                  'pauseVoice',
	                  'stopVoice',
	                  'uploadVoice',
	                  'downloadVoice',
	                  'chooseImage',
	                  'previewImage',
	                  'uploadImage',
	                  'downloadImage',
	                  'getNetworkType',
	                  'openLocation',
	                  'getLocation',
	                  'hideOptionMenu',
	                  'showOptionMenu',
	                  'closeWindow',
	                  'scanQRCode',
	                  'chooseWXPay',
	                  'openProductSpecificView',
	                  'addCard',
	                  'chooseCard',
	                  'openCard'
	                ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
		});
		
		wx.ready(function(){
			//分享到朋友圈
		  wx.onMenuShareTimeline({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    success: function(){
		    	
		    },
		    cancel: function(){
		    }
		  });
		  //分享给好友
		  wx.onMenuShareAppMessage({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    desc:'<?php echo $share_description ? $share_description : C("SHARE_DEFAULT_DESC");?>', // 分享描述
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    type: '',
		    dataUrl: '',
		    success: function () { 
		    },
		    cancel: function () { 
		
		    }
		  });  
		  
		  wx.getNetworkType({
			    success: function (res) {
			        var networkType = res.networkType; // 返回网络类型2g，3g，4g，wifi
			        $("#networkType").val(networkType);
			    }
			});
		  
		  //复制链接menuItem:copyUrl
		  wx.hideMenuItems({
			 menuList: ["menuItem:originPage",
			            "menuItem:share:facebook",
			            "menuItem:share:qq",
			            "menuItem:share:weiboApp",
			            "menuItem:share:QZone",
			            "menuItem:readMode",
			         //   "menuItem:openWithQQBrowser",
			         //   "menuItem:openWithSafari",
			            "menuItem:share:email",
			            "menuItem:share:brand",
			            "menuItem:copyUrl",//复制链接
			            <?php if($controller == 'qrcode'){ ?>
			            "menuItem:share:timeline",//朋友圈
			            "menuItem:share:appMessage",//朋友
			            <?php } ?>
			            ], // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
		      success: function (res) {
		         // alert('已隐藏“阅读模式”，“分享到朋友圈”，“复制链接”等按钮');
		        },
		        fail: function (res) {
		          //alert(JSON.stringify(res));
		        }
		  });
		  
		  //wx.hideOptionMenu();//批量隐藏保护类 传播类按钮
		 
		});

		//浏览图片
		function previewImage(now_pic,pics){
			wx.previewImage({
			   current: now_pic, // 当前显示图片的http链接
			   urls: pics // 需要预览的图片http链接列表
			});
		}
		
		//浏览图片
		$('.previewImageList').on('click', function(){
			var now_pic = $(this).attr("src");
			var pics = new Array();
			
			$('.previewImage').each(function(index) {
				pics[index] = $(this).attr("src");
			 });
			
			previewImage(now_pic,pics);
			
		});

		</script>

<?php } ?>
		
<?php if(!$is_mobile){ ?>
        <style>
html,body{
    height:100%;
    width:50%;
    margin:0 auto;
}
.nav{
    position:fixed;
    width:25%;

}
.morder_nav{
	position:absolute;
}
</style>
<?php } ?>
	</head>
<body>
	<link rel="stylesheet" type="text/css"
	href="/Static/mobile/css/reset.css" />
<link rel="stylesheet" href="/Static/mobile/css/regularmembers.css">
<style>
    body{
        line-height: inherit;
    }
</style>
<div class="membersbox pad50">
	<style>
.ricon {
	float:right;margin-right:30px;color:#ffa131;
}
.userinfo {
    margin-top:40px;
}
.userimg{
    margin-top:30px;
}
.userinfo p strong{
    color:#fff;
}
.userinfo h3 strong{
    color:#fff;
}
</style>

<section class="headers clearfix" id="header"
		style="height: 180.28125px; background-image: url('<?php echo C("UPYUN_DOMAIN"); echo C('USER_BANNER');?>!/fw/640');">
		<div class="headerModule clearfix">
			<div class="userimg fl">
                            <img id="headimg" src="<?php echo $memberinfo['headimgurl'] ? $memberinfo['headimgurl'] : '/Static/mobile/images/userimg.png';?>" alt=""  onerror="javascript:this.src='/Static/mobile/images/userimg.png';">
                                <input id="file" style="display:none" name="file" type="file"/>
				</div>
			<div class="userinfo fl" id="userinfo" style="width: 65%;">
				<h2 class="clearfix">
					<strong class="fl">账号ID：<?php echo $memberinfo['uid'];?></strong>
				</h2>
				<h2 class="clearfix">
					<strong class="fl"><?php echo $memberinfo['realname'] ? $memberinfo['realname'] : $memberinfo['nickname'];?></strong><span class="fl"><?php echo $user_grade;?></span>
				</h2>
				<?php if($memberinfo['refer_uid']){?>
				<p style="width: 100%;overflow: hidden;">我的天使：<strong><?php echo $refer['realname'];?> (ID:<?php echo $memberinfo['refer_uid'];?>)</strong></p>
                                <p style="width: 100%;overflow: hidden;">天使手机号：<strong><?php echo $refer['mobile'];?></strong></p>

                                <?php } ?>
				<h3>
<!--				锁定<?php echo C("YONGJIN_NAME");?>：<strong class="points"><?php echo $memberinfo['locked_money'];?></strong>
				可用<?php echo C("YONGJIN_NAME");?>:<strong class="points"><?php echo $memberinfo['money'];?></strong>
                                <br>
				<?php echo C("CASH_NAME");?>:<strong class="points"><?php echo $memberinfo['cash_money'];?></strong>-->
                                
                                <?php if($memberinfo['mobile']){?>
                                手机:<strong class="points"><?php echo $memberinfo['mobile'];?></strong>
                                <?php } ?>
                                </h3>
			</div>
			
			<!-- 
			<div class="webmsg fr">
				<p class="msgnum">
					<a href="#" class="mail"><img
						src="/Static/mobile/images/mailbg.png" width="20" alt=""></a>
				</p>
			</div>
			 -->
			
		</div>
	</section>

<script>
    $(document).ready(function(){
		
        var UPYUN_DOMAIN = "<?php echo C('UPYUN_DOMAIN');?>";
        //选择图片上传
        $("#headimg").on('click', function(){
            $('#file').click();
        });
        $('#file').on('change',function(){
            layer.open({
                type: 2
                ,content: '上传中，请稍等'
            });
            var file = $(this)[0].files[0];
            var formData = new FormData();
            formData.append('file',file);
            $.ajax({
                url: '/mobile/user/downloadpic?dtype=headimg',
                type: 'post',
                data: formData,
                processData: false,
                contentType: false
            })
            .done(function(res){
                $('#headimg').attr('src',UPYUN_DOMAIN+res.data);
                 layer.closeAll();
            })
            .fail(function(){
                layer.closeAll();
            })
        });
    });
</script>
	<section class="mainmodule">
		<!-- /0待支付,1已付款,,2完成,3.待退款 4已退款,5发货,0未完成,6订单关闭, -->
<style>
    .mainicon ul li {
        display: inline-block;
        width: 33.33%;
        height: 100%;
        float: left;
        text-align: center;
        position: relative;
    }
</style>
<div class="mainicon ">
	<ul class="clearfix">
		<li><a href="/mobile/orderlists"> <img
				src="/Static/mobile/images/icon_order.png" width="36">
				<p>全部订单</p> <span class="nb"><?php echo $order_count[10];?></span>
		</a></li>

		<li><a href="/mobile/orderlists?status=9"><img
				src="/Static/mobile/images/icon_pay.png" width="36">
				<p>待付款</p> <span class="nb"><?php echo $order_count[0];?></span></a></li>
		<li><a href="/mobile/orderlists?status=5"><img
                            src="/Static/mobile/images/icon_send.png" width="40">
                            <p>待收货</p> <span class="nb"><?php echo $order_count[5];?></span></a></li>
<!--		<li><a href="/mobile/orderlists?status=3"><img
                            src="/Static/mobile/images/icon_return.png" width="36">
                            <p>已完成</p> <span class="nb"><?php echo $order_count[11];?></span></a></li>-->
	</ul>
</div>
		<?php if(!$is_mobile){ ?>
<style>
html,body{
    height:100%;
    width:50%;
    margin:0 auto;
}
.nav{
    position:fixed;
    width:25%;
}
.morder_nav{
    position:absolute;
}
</style>
<?php } ?>
<?php $is_wechat=true; ?>
 <style>
        .grid-main{
            display: -webkit-box; /* 老版本语法: Safari, iOS, Android browser, older WebKit browsers. */
            display: -webkit-flex; /* 新版本语法: Chrome 21+ */
            display: flex; /* 新版本语法: Opera 12.1, Firefox 22+ */
            -webkit-flex-wrap: wrap;
            flex-wrap: wrap;
            padding:10px;
            overflow-y:scroll;
        }
        .grid-main .item {
            display: block;
            -webkit-box-flex: 0 0 33.333%;
            -webkit-flex: 0 0 33.333%;
            flex: 0 0 33.333%;
            text-align:center;
            background:#fff;padding:10px;box-sizing: border-box;border:2px #F8F8F8 solid;position:relative;
        }
        .grid-main .itemnew {
            display: block;
            -webkit-box-flex: 0 0 50%;
            -webkit-flex: 0 0 50%;
            flex: 0 0 50%;
            text-align:center;
            background:#fff;padding:10px;box-sizing: border-box;border:2px #F8F8F8 solid;position:relative;
        }
        
       
        
        .grid-main .badge {
            position: absolute;color:#fff;background:#E74135;top:10px;right:10px;font-size:10px;
            border:2px red solid;border-radius: 50%;padding:0px;height:30px;width:30px;line-height: 30px;
            font-size:10px;white-space:nowrap;
        }
        .grid-main .icon {
            font-size:40px;color:#07B25D;
        }
        .grid-main img {
            width:50px;
            height:50px;
        }
        .sub-title {
            padding: 5px 10px 0 10px;
            display: block;
            font-size: 15px;
            color:#7D7B82;
        }
    </style>
<div class="mainlist">
     <div class="grid-main">
    
         <?php if($memberinfo['grade_id']>=1){ ?>
        <a class="item">
                <span style="font-size:15px;"><?=$mydata['mymoney']?></span>
                <div style="color:#999;">我的业绩</div>
            </a>
             <a class="item">
                <span style="font-size:15px;"><?=$mydata['teammoney']?></span>
                <div style="color:#999;">团队业绩</div>
            </a>
         
          <a href="/mobile/goods/lists?gtype_id=9" class="item">
                <span style="font-size:15px;"><?=$memberinfo['score']?></span>
                <div style="color:#999;">积分兑换</div>
            </a>
        
        <a class="item">
            <span style="font-size:15px;"><?=$mydata['month_mymoney']?></span>
            <div style="color:#999;">我的本月业绩</div>
        </a>
         <a class="item">
            <span style="font-size:15px;"><?=$mydata['month_teammoney']?></span>
            <div style="color:#999;">团队本月业绩</div>
        </a>
          <a class="item">
                <span style="font-size:15px;"><?=$mydata['month_fanli']?></span>
                <div style="color:#999;">月度返利</div>
            </a>
    <?php }else { ?>

    
    <?php } ?>
    <a class="item" style="width:100%;flex:none;">
        <span style="font-size:15px;"><?=$mydata['refer_money']?></span>
        <div style="color:#999;">直属报单金额</div>
    </a>
    </div>
 
    <div class="grid-main" style="">
    <a 
        href="/mobile/moneylists/money"
        class="item">
        <i class="icon iconfont icon-shouyi">
        </i>
        <div style="color:#999;">我的<?php echo C('YONGJIN_NAME');?></div>
    </a>
<!--    <a 
        href="/mobile/moneylists/lockedmoney"
        class="item">
        <i class="icon iconfont icon-redpacket">
        </i>
        <div style="color:#999;">我的锁定<?php echo C('YONGJIN_NAME');?></div>
    </a>-->
<!--    <a href="/mobile/transfersmoney" class="item">
        <i class="icon iconfont icon-zhuanzhang">
        </i>
        <div style="color:#999;"><?php echo C('YONGJIN_NAME');?>转账</div>
    </a>-->
    <a 
        <?php if($is_wechat){ ?>
        href="/mobile/withdraw/index"
        <?php }else{ ?>
        onclick="showtixian()"
        <?php } ?>
        class="item">
        <i class="icon iconfont icon-tixian">
        </i>
        <div style="color:#999;"><?php echo C('YONGJIN_NAME');?>提现</div>

    </a>
<!--<a 
        href="/mobile/moneylists/cash"
        class="item">
        <i class="icon iconfont icon-moneybag">
        </i>
        <div style="color:#999;">我的<?php echo C('CASH_NAME');?></div>
    </a>-->
    
    
<a 
        href="/mobile/withdraw/deposit"
        class="item">
        <i class="icon iconfont icon-moneybag">
        </i>
        <div style="color:#999;">我的保证金</div>
    </a>
    
    

    
    
<!--    <a href="/mobile/withdraw/lists" class="item">
        <i class="icon iconfont icon-record">
        </i>
        <div style="color:#999;">提现记录</div>
    </a>-->
<!--    <a 
        <?php if($is_wechat){ ?>
        href="/mobile/charge/chargescore"
        <?php }else{ ?>
        onclick="showtixian()"
        <?php } ?>
        class="item">
        <i class="icon iconfont icon-chongzhi">
        </i>
        <div style="color:#999;">充值</div>
    </a>-->
<!--    <a 
        href="/mobile/moneylists/score"
        class="item">
        <i class="icon iconfont icon-text">
        </i>
        <div style="color:#999;">我的<?php echo C('SCORE_NAME');?></div>
    </a>-->
   

    <a 
        href="/mobile/moneylists/stock"
        class="item">
        <i class="icon iconfont icon-warehouse">
        </i>
        <div style="color:#999;">库存明细</div>
    </a>
    <a 
        href="/mobile/cart/tihuo"
        class="item">
        <i class="icon iconfont icon-warehouse">
        </i>
        <div style="color:#999;">提货</div>
    </a>
    <a 
        href="/mobile/cart/buhuo"
        class="item">
        <i class="icon iconfont icon-warehouse">
        </i>
        <div style="color:#999;">补货</div>
    </a>
    
    <?php if($memberinfo['grade_id']>=3){ ?>
    <!-- <a 
        href="/mobile/cart/transfer"
        class="item">
        <i class="icon iconfont icon-warehouse">
        </i>
        <div style="color:#999;">拨货</div>
    </a> -->
    <?php } ?>
    
    <a 
        href="/mobile/cart/jiameng"
        class="item">
        <i class="icon iconfont icon-record">
        </i>
        <div style="color:#999;">申请加盟商</div>
    </a>

    <a 
        href="/mobile/cart/daili"
        class="item">
        <i class="icon iconfont icon-record">
        </i>
        <div style="color:#999;">申请地区代理</div>
    </a>
     
    <a 
        href="/mobile/user/daili/?dj=1"
        class="item">
        <i class="icon iconfont icon-tuandui">
        </i>
        <div style="color:#999;">我的<?=C('XIAJI_NAME')?></div>
    </a>
 

    <!--
    <a 
        href="/mobile/zhengshu"
        class="item">
        <i class="icon iconfont icon-zhengshu">
        </i>
        <div style="color:#999;">代理证书</div>
    </a>
    -->
    <?php if($is_wechat){ ?>
            <?php if($memberinfo['openid']){ ?>
     <a 
        href="javascript:unbind();"
        class="item">
        <i class="icon iconfont icon-jiebang">
        </i>
        <div style="color:#999;">解绑微信</div>
    </a>
            <?php }else{ ?>
    <a 
        href="javascript:bind();"
        class="item">
        <i class="icon iconfont icon-bangding">
        </i>
        <div style="color:#999;">绑定微信</div>
    </a>
            <?php } ?>
            <?php } ?>
    <a href="/mobile/login/quit" class="item">
        <i class="icon iconfont icon-tuichu">
        </i>
        <div style="color:#999;">退出登录</div>
    </a>
    <a href="/mobile/login/changepw" class="item">
        <i class="icon iconfont icon-mima">
        </i>
        <div style="color:#999;">修改密码</div>
    </a>
  </div>
</div>

<li class="mlogin_but" style="margin-top: 30px;">
    <a href="/mobile/qrcode/index">我的推广二维码</a>
</li>

<script>
/*
 * quxiaotuikuan
 */
 function bind(){
	    layer.open({
	        content: "亲,你确定要绑定当前登录的微信号吗?",
	        btn: ['确定', '取消'],
	        yes: function(index){
	        	AjaxUrl('/mobile/bind/wechat');
	            layer.close(index);
	        }
	    });
	}
 function unbind(){
	    layer.open({
	        content: "亲,你确定要取消绑定已绑定的微信吗?",
	        btn: ['确定', '取消'],
	        yes: function(index){
	        	AjaxUrl('/mobile/bind/unwechat');
	            layer.close(index);
	        }
	    });
	}
    function showtixian(){
        layer.open({
            title: [
              '提醒',
              'background-color: #FF4351; color:#fff;'
            ],
            content: '为了您的资金安全，该操作需在微信端进行',
            btn: ['确定']
          });
    }
	
</script>
	</section>
			<section class="members_bottom">
			<section style="height: 48px;">
				&copy; <?php echo date('Y');?> <?php echo C("SITE_NAME");?> 版权所有
				<p><?php echo C("POWER_BY");?></p>
			</section>
		</section>

<?php if(!$nocart){?>
<!--  
<a href="/mobile/cart/mycart" class="navCart" id="navCart"><span><?php echo $cartNum;?></span></a>
-->
<?php } ?>
</div>
<style>
    .nav section .nav-item.wid4{
        width:25%;
    }
    .nav-item h2 {
        line-height: 20px;
        top: -5px;
        position: relative;
    }
    body{
        line-height: inherit;
    }
</style>
<div class="nav">
    <section class="inner">
        <section class="nav-lists clearfix hasmenu9">
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $controller=='index'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-home<?php echo $controller=='index'?'fill':'';?>"><h2>首页</h2></i>
                    </a>
                </dt>
            </dl>
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/daili" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $action=='baodan'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-list<?php echo $action=='daili'?'':'';?>"><h2>申请代理</h2></i>
                    </a>
                </dt>
            </dl>
            
             <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/mycart" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $controller=='cart'&&$action=='mycart'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-cart<?php echo $controller=='cart'&&$action=='mycart'?'_fill':'';?>_light"><h2>购物车</h2></i>
                    </a>
                </dt>
            </dl>
            <!--
           <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/buhuo" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $action=='buhuo'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-list<?php echo $action=='buhuo'?'':'';?>"><h2>补货</h2></i>
                    </a>
                </dt>
            </dl>
            
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/cart/transfer" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $action=='transfer'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-list<?php echo $action=='transfer'?'':'';?>"><h2>拨货</h2></i>
                    </a>
                </dt>
            </dl> -->
            <dl class="nav-item j-showNavSub wid4 style1 fl">
                <dt>
                    <a href="/mobile/user" style="background-color: #fff; color: #333">
                        <i style="font-size: 20px;<?php echo $controller=='user'?'color:#3BA7D5;':'';?>" class="icon iconfont icon-people<?php echo $controller=='user'?'fill':'';?>"><h2>我的</h2></i>

                    </a>
                </dt>
            </dl>
        </section>
    </section>
</div>
<!-- 如果是微信客户端 -->
<input id="networkType" value="" type="hidden">
<?php if($is_wechat){ ?>
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript"></script>
<script type="text/javascript">
		wx.config({
		
		<?php if($hlopenid =="oaGjOtyJCTObWB2BZbkLfxyVHTMA"){?>
		 debug:true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，
		
		<?php } ?>
		
		  //若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
		  appId:'<?php echo ($jssign['appid']); ?>', // 必填，公众号的唯一标识
		  timestamp:'<?php echo ($jssign['timestamp']); ?>', // 必填，生成签名的时间戳
		  nonceStr:'<?php echo ($jssign['noncestr']); ?>', // 必填，生成签名的随机串
		  signature:'<?php echo ($jssign['signature']); ?>',// 必填，签名，见附录1
	      jsApiList: [
	                  'checkJsApi',
	                  'onMenuShareTimeline',
	                  'onMenuShareAppMessage',
	                  'onMenuShareQQ',
	                  'onMenuShareWeibo',
	                  'onMenuShareQZone',
	                  'hideMenuItems',
	                  'showMenuItems',
	                  'hideAllNonBaseMenuItem',
	                  'showAllNonBaseMenuItem',
	                  'translateVoice',
	                  'startRecord',
	                  'stopRecord',
	                  'onVoiceRecordEnd',
	                  'playVoice',
	                  'onVoicePlayEnd',
	                  'pauseVoice',
	                  'stopVoice',
	                  'uploadVoice',
	                  'downloadVoice',
	                  'chooseImage',
	                  'previewImage',
	                  'uploadImage',
	                  'downloadImage',
	                  'getNetworkType',
	                  'openLocation',
	                  'getLocation',
	                  'hideOptionMenu',
	                  'showOptionMenu',
	                  'closeWindow',
	                  'scanQRCode',
	                  'chooseWXPay',
	                  'openProductSpecificView',
	                  'addCard',
	                  'chooseCard',
	                  'openCard'
	                ] // 必填，需要使用的JS接口列表，所有JS接口列表见附录2
		});
		
		wx.ready(function(){
			//分享到朋友圈
		  wx.onMenuShareTimeline({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    success: function(){
		    	
		    },
		    cancel: function(){
		    }
		  });
		  //分享给好友
		  wx.onMenuShareAppMessage({
		    title:'<?php echo $share_title ? $share_title : C("SHARE_DEFAULT_TITLE");?>', // 分享标题
		    desc:'<?php echo $share_description ? $share_description : C("SHARE_DEFAULT_DESC");?>', // 分享描述
		    link:'<?php echo $share_url ? $share_url : C("SHARE_DEFAULT_URL");?>', // 分享链接
		    imgUrl:'<?php echo $share_img ? $share_img : C("SHARE_DEFAULT_IMG");?>', // 分享图标
		    type: '',
		    dataUrl: '',
		    success: function () { 
		    },
		    cancel: function () { 
		
		    }
		  });  
		  
		  wx.getNetworkType({
			    success: function (res) {
			        var networkType = res.networkType; // 返回网络类型2g，3g，4g，wifi
			        $("#networkType").val(networkType);
			    }
			});
		  
		  //复制链接menuItem:copyUrl
		  wx.hideMenuItems({
			 menuList: ["menuItem:originPage",
			            "menuItem:share:facebook",
			            "menuItem:share:qq",
			            "menuItem:share:weiboApp",
			            "menuItem:share:QZone",
			            "menuItem:readMode",
			         //   "menuItem:openWithQQBrowser",
			         //   "menuItem:openWithSafari",
			            "menuItem:share:email",
			            "menuItem:share:brand",
			            "menuItem:copyUrl",//复制链接
			            <?php if($controller == 'qrcode'){ ?>
			            "menuItem:share:timeline",//朋友圈
			            "menuItem:share:appMessage",//朋友
			            <?php } ?>
			            ], // 要隐藏的菜单项，只能隐藏“传播类”和“保护类”按钮，所有menu项见附录3
		      success: function (res) {
		         // alert('已隐藏“阅读模式”，“分享到朋友圈”，“复制链接”等按钮');
		        },
		        fail: function (res) {
		          //alert(JSON.stringify(res));
		        }
		  });
		  
		  //wx.hideOptionMenu();//批量隐藏保护类 传播类按钮
		 
		});

		//浏览图片
		function previewImage(now_pic,pics){
			wx.previewImage({
			   current: now_pic, // 当前显示图片的http链接
			   urls: pics // 需要预览的图片http链接列表
			});
		}
		
		//浏览图片
		$('.previewImageList').on('click', function(){
			var now_pic = $(this).attr("src");
			var pics = new Array();
			
			$('.previewImage').each(function(index) {
				pics[index] = $(this).attr("src");
			 });
			
			previewImage(now_pic,pics);
			
		});

		</script>

<?php } ?>
<script>
//image lazyload
$(function(){
    $("img.lazyload").lazyload({
        threshold:650
    });
});
<?php if($showad) { ?>
var html = '<div><?php echo htmlspecialchars_decode(C('AD_DETAIL'));?></div>';
var pageii = layer.open({
  type: 1
  ,content: html
  ,anim: 'up'
  ,style: 'position:fixed;overflow:scroll; left:10%; top:15%; width:80%; max-height:70%; border: none; -webkit-animation-duration: .5s; animation-duration: .5s;'
});      
var adHeight = $('#showad').height();
$('.layui-m-layercont').css('height',adHeight+'px');
$('.layermanim').css('height',adHeight+'px');
<?php } ?>

</script>
</body>
</html>